package com.dys.spring3.dao.impl;

import com.dys.spring3.bean.User;
import com.dys.spring3.dao.UserDao;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: 疾风
 * @ClassName: UserDaoImpl
 * @Description: UserDao实现类
 * @CreateDate: 2024/10/18
 * @Version: v1.0.0
 */
@Repository
public class UserDaoImpl implements UserDao {
    @Override
    public List<User> selectAllUsers() {
        List<User> list = new ArrayList<User>();
        User user = null;
        for (int i = 1; i <= 10; i++) {
            user = new User();
            user.setId(i);
            user.setUsername("admin" + i);
            user.setPassword("admin" + i);
            list.add(user);
        }
        return list;
    }
}
